/*============================================================================
  File:      StaticAlgorithmMetadata.h
 
  Summary:   Macro that implements the IDMAlgorithmMetadata interface.

  Date:		 September 12, 2003
------------------------------------------------------------------------------
  This file is part of the Microsoft SQL Server Code Samples.
 
  Copyright (C) 2003 Microsoft Corporation.  All rights reserved.
 
This source code is intended only as a supplement to Microsoft
Development Tools and/or on-line documentation.  See these other
materials for detailed information regarding Microsoft code samples.
 
THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
PARTICULAR PURPOSE.
============================================================================*/


#pragma once

// This macro implements the IDMAlgorithmMetadata interface 
// by calling the corresponding static members in the algorithm class. 

#define IMPLEMENT_STATIC_ALGORITHM_METADATA(YOUR_ALG_CLASS)							\
																					\
	STDMETHOD (GetServiceType)(														\
        /* [in]  */	IDMContextServices* in_pContext,								\
		/* [out] */ ULONG *out_pServiceTypeID)										\
	{																				\
		return YOUR_ALG_CLASS::GetServiceType(in_pContext, out_pServiceTypeID);		\
	}																				\
																					\
    STDMETHOD (GetServiceName)(														\
		/* [in]  */	IDMContextServices* in_pContext,								\
        /* [out] */ DMString *io_pstrServiceName)									\
    {																				\
		return YOUR_ALG_CLASS::GetServiceName(in_pContext, io_pstrServiceName);		\
	}																				\
																					\
    STDMETHOD (GetDisplayName)(														\
		/* [in]  */	IDMContextServices* in_pContext,								\
        /* [out] */ DMString *io_pstrDisplayName)									\
    {																				\
		return YOUR_ALG_CLASS::GetDisplayName(in_pContext, io_pstrDisplayName);		\
	}																				\
																					\
	STDMETHOD (GetServiceGuid)(														\
		/* [in]  */ IDMContextServices* in_pContext,								\
		/* [out] */ GUID *out_pguidServiceGUID)										\
    {																				\
		return YOUR_ALG_CLASS::GetServiceGuid(in_pContext, out_pguidServiceGUID);	\
	}																				\
																					\
	STDMETHOD (GetDescription)(														\
		/* [in]  */	IDMContextServices* in_pContext,								\
        /* [out] */ DMString *io_pstrDescription)									\
    {																				\
		return YOUR_ALG_CLASS::GetDescription(in_pContext, io_pstrDescription);		\
	}																				\
																					\
    STDMETHOD (GetPredictionLimit)(													\
		/* [in]  */	IDMContextServices* in_pContext,								\
		/* [out] */ LONG *out_pPredictionLimit)										\
    {																				\
		return YOUR_ALG_CLASS::GetPredictionLimit(in_pContext,						\
												  out_pPredictionLimit);			\
	}																				\
																					\
    STDMETHOD (GetSupDistributionFlags)(											\
		/* [in]  */	IDMContextServices* in_pContext,								\
        /* [out] */ ULONG **out_prgFlags,											\
        /* [out] */ ULONG *out_cFlags)												\
    {																				\
		return YOUR_ALG_CLASS::GetSupDistributionFlags(in_pContext,					\
													   out_prgFlags,				\
													   out_cFlags);					\
	}																				\
																					\
    STDMETHOD (GetSupInputContentTypes)(											\
		/* [in]  */	IDMContextServices* in_pContext,								\
        /* [out] */ ULONG **out_prgTypes,											\
        /* [out] */ ULONG *out_cTypes)												\
    {																				\
		return YOUR_ALG_CLASS::GetSupInputContentTypes(in_pContext,					\
													   out_prgTypes,				\
													   out_cTypes);					\
	}																				\
																					\
    STDMETHOD (GetSupPredictContentTypes)(											\
		/* [in]  */	IDMContextServices* in_pContext,								\
        /* [out] */ ULONG **out_prgTypes,											\
        /* [out] */ ULONG *out_cTypes)												\
    {																				\
		return YOUR_ALG_CLASS::GetSupPredictContentTypes(in_pContext,				\
														 out_prgTypes,				\
														 out_cTypes);				\
	}																				\
																					\
    STDMETHOD (GetSupModelingFlags)(												\
		/* [in]  */	IDMContextServices* in_pContext,								\
        /* [out] */ DM_MODELING_FLAG **out_prgFlags,											\
        /* [out] */ ULONG *out_pcFlags)												\
    {																				\
		return YOUR_ALG_CLASS::GetSupModelingFlags(in_pContext,						\
												   out_prgFlags,					\
												   out_pcFlags);						\
	}																				\
																					\
    STDMETHOD (GetModelingFlagName)(												\
		/* [in]  */	IDMContextServices* in_pContext,								\
        /* [in] */ DM_MODELING_FLAG in_Flag,											\
        /* [out] */ DMString *io_pstrFlagName)												\
    {																				\
		return YOUR_ALG_CLASS::GetModelingFlagName(in_pContext,						\
												   in_Flag,					\
												   io_pstrFlagName);						\
	}																				\
																					\
	STDMETHOD (GetTrainingComplexity)(												\
	/* [in]  */	IDMContextServices* in_pContext,									\
    /* [out] */ LONG *out_pTrainingComplexity)										\
    {																				\
		return YOUR_ALG_CLASS::GetTrainingComplexity(in_pContext,					\
													 out_pTrainingComplexity);		\
	}																				\
																					\
    STDMETHOD (GetPredictionComplexity)(											\
		/* [in]  */	IDMContextServices* in_pContext,								\
        /* [out] */ LONG *out_pPredictionComplexity)								\
    {																				\
		return YOUR_ALG_CLASS::GetPredictionComplexity(in_pContext,					\
													   out_pPredictionComplexity);	\
	}																				\
																					\
    STDMETHOD (GetExpectedQuality)(													\
		/* [in]  */	IDMContextServices* in_pContext,								\
        /* [out] */ LONG *out_pExpectedQuality)										\
    {																				\
		return YOUR_ALG_CLASS::GetExpectedQuality(in_pContext,						\
												  out_pExpectedQuality);			\
	}																				\
																					\
    STDMETHOD (GetScaling)(															\
		/* [in]  */	IDMContextServices* in_pContext,								\
        /* [out] */ LONG *out_pScaling)												\
    {																				\
		return YOUR_ALG_CLASS::GetScaling(in_pContext, out_pScaling);				\
	}																				\
																					\
    STDMETHOD (GetAllowIncrementalInsert)(											\
		/* [in]  */	IDMContextServices* in_pContext,								\
        /* [out] */ BOOL *out_pfIncrementalInsert)									\
	{																				\
		return YOUR_ALG_CLASS::GetAllowIncrementalInsert(in_pContext,				\
														 out_pfIncrementalInsert);	\
	}																				\
																					\
    STDMETHOD (GetAllowDuplicateKey)(												\
		/* [in]  */	IDMContextServices* in_pContext,								\
        /* [out] */ BOOL *out_pfDuplicateKey)										\
    {																				\
		return YOUR_ALG_CLASS::GetAllowDuplicateKey(in_pContext,					\
													out_pfDuplicateKey);			\
	}																				\
																					\
    STDMETHOD (GetControl)(															\
		/* [in]  */	IDMContextServices* in_pContext,								\
        /* [out] */ LONG *out_pControl)												\
    {																				\
		return YOUR_ALG_CLASS::GetControl(in_pContext, out_pControl);				\
	}																				\
    																				\
    STDMETHOD (GetViewerType)(														\
		/* [in]  */	IDMContextServices* in_pContext,								\
        /* [out] */ DMString *io_pstrViewerType)									\
    {																				\
		return YOUR_ALG_CLASS::GetViewerType(in_pContext, io_pstrViewerType);		\
	}																				\
    																				\
    STDMETHOD (GetSupportsDMDimensions)(											\
		/* [in]  */	IDMContextServices* in_pContext,								\
        /* [out] */ BOOL *out_pfSupportsDMDimensions)								\
    {																				\
		return YOUR_ALG_CLASS::GetSupportsDMDimensions(in_pContext,					\
													   out_pfSupportsDMDimensions);	\
	}																				\
    																				\
    STDMETHOD (GetSupportsDrillthrough)(											\
		/* [in]  */	IDMContextServices* in_pContext,								\
        /* [out] */ BOOL *out_pfSupportsDrillthrough,								\
		/* [out] */ BOOL *out_pfMustIncludeChildren)								\
	{																				\
		return YOUR_ALG_CLASS::GetSupportsDrillthrough(in_pContext,					\
													   out_pfSupportsDrillthrough,	\
													   out_pfMustIncludeChildren);	\
	}																				\
    																				\
    STDMETHOD (GetSupportedFunctions)(											\
        /* [in] */ IDMContextServices *in_pContext,									\
        /* [out] */ DM_SUPPORTED_FUNCTION **out_prgFuncs,											\
        /* [out] */ ULONG *out_cFuncs)												\
    {																				\
		return YOUR_ALG_CLASS::GetSupportedFunctions(in_pContext,				\
														out_prgFuncs,				\
														out_cFuncs);				\
	}																				\
    																				\
    STDMETHOD (GetNumParameters)(													\
		/* [in]  */	IDMContextServices* in_pContext,								\
        /* [out] */ ULONG *out_pcParameters)										\
    {																				\
		return YOUR_ALG_CLASS::GetNumParameters(in_pContext, out_pcParameters);		\
	}																				\
    																				\
    STDMETHOD (GetParameterName)(													\
		/* [in]  */	IDMContextServices* in_pContext,								\
        /* [in] */ ULONG in_iParameter,												\
        /* [out] */ DMString *io_pstrParameterName)									\
    {																				\
		return YOUR_ALG_CLASS::GetParameterName(in_pContext,						\
												in_iParameter,						\
												io_pstrParameterName);				\
	}																				\
    																				\
    STDMETHOD (GetParameterType)(													\
		/* [in]  */	IDMContextServices* in_pContext,								\
        /* [in] */ ULONG in_iParameter,												\
        /* [out] */ DMString *io_pstrParameterType)									\
    {																				\
		return YOUR_ALG_CLASS::GetParameterType(in_pContext,						\
											    in_iParameter,						\
												io_pstrParameterType);				\
	}																				\
    																				\
    STDMETHOD (GetParameterIsRequired)(														\
		/* [in]  */	IDMContextServices* in_pContext,								\
        /* [in] */ ULONG in_iParameter,												\
        /* [out] */ BOOL *out_pfIsRequired)											\
	{																				\
		return YOUR_ALG_CLASS::GetParameterIsRequired(in_pContext,							\
											 in_iParameter,							\
											out_pfIsRequired);						\
	}																				\
    																				\
    STDMETHOD (GetParameterIsExposed)(														\
		/* [in]  */	IDMContextServices* in_pContext,								\
        /* [in] */ ULONG in_iParameter,												\
        /* [out] */ BOOL *out_pfIsExposed)											\
    {																				\
		return YOUR_ALG_CLASS::GetParameterIsExposed(in_pContext, in_iParameter, out_pfIsExposed);		\
	}																				\
    																				\
    STDMETHOD (GetParameterFlags)(													\
		/* [in]  */	IDMContextServices* in_pContext,								\
        /* [in] */ ULONG in_iParameter,												\
        /* [out] */ ULONG *out_pulParameterFlags)									\
    {																				\
		return YOUR_ALG_CLASS::GetParameterFlags(in_pContext,						\
												 in_iParameter,						\
												 out_pulParameterFlags);			\
	}																				\
    																				\
    STDMETHOD (GetParameterDescription)(											\
		/* [in]  */	IDMContextServices* in_pContext,								\
        /* [in] */ ULONG in_iParameter,												\
        /* [in] */ ULONG in_LocaleID,												\
        /* [out] */ DMString *io_pstrDescription)									\
    {																				\
		return YOUR_ALG_CLASS::GetParameterDescription(in_pContext,					\
													   in_iParameter,				\
													   in_LocaleID,					\
													   io_pstrDescription);			\
	}																				\
    																				\
    STDMETHOD (GetParameterDefaultValue)(											\
		/* [in]  */	IDMContextServices* in_pContext,								\
        /* [in] */ ULONG in_iParameter,												\
        /* [out] */ DMString *io_pstrDefaultValue)									\
    {																				\
		return YOUR_ALG_CLASS::GetParameterDefaultValue(in_pContext,				\
														in_iParameter,				\
														io_pstrDefaultValue);		\
	}																				\
    																				\
    STDMETHOD (GetParameterValueEnumeration)(										\
		/* [in]  */	IDMContextServices* in_pContext,								\
        /* [in] */ ULONG in_iParameter,												\
        /* [out] */ DMString *io_pstrValueEnum)										\
    {																				\
		return YOUR_ALG_CLASS::GetParameterValueEnumeration(in_pContext,			\
															in_iParameter,			\
															io_pstrValueEnum);		\
	}																				\
    																				\
    STDMETHOD (ParseParameterValue)(												\
		/* [in]  */	IDMContextServices* in_pContext,								\
        /* [in] */ ULONG in_iParameter,												\
        /* [in] */ DMString *in_pstrParameterStrValue,								\
        /* [in] */ DMVariantPtr io_pParameterMappedValue)							\
    {																				\
		return YOUR_ALG_CLASS::ParseParameterValue(in_pContext,						\
												   in_iParameter,					\
												   in_pstrParameterStrValue,		\
												   io_pParameterMappedValue);		\
	}																				\
    																				\
    STDMETHOD (GetMarginalRequirements)(											\
		/* [in]  */	IDMContextServices* in_pContext,								\
        /* [out] */ DMMarginalRequirements *out_pReq)								\
    {																				\
		return YOUR_ALG_CLASS::GetMarginalRequirements(in_pContext, out_pReq);		\
	}																				\
    																				\
    STDMETHOD (GetCaseIDModelled)(													\
		/* [in] */ IDMContextServices *in_pContext,									\
		/* [out] */ BOOL *out_pfIsModelled)											\
	{																				\
		return YOUR_ALG_CLASS::GetCaseIDModelled(in_pContext, out_pfIsModelled);	\
	}																				\
    																				\
    STDMETHOD (GetSupportsPMML)(													\
		/* [in] */ IDMContextServices *in_pContext,									\
		/* [out] */ BOOL *out_pfSupportsPMML)										\
	{																				\
		return YOUR_ALG_CLASS::GetSupportsPMML(in_pContext, out_pfSupportsPMML);	\
	}																				\
    STDMETHOD (ValidateAttributeSet)(												\
		/* [in]  */	IDMContextServices* in_pContext,								\
        /* [in] */ IDMAttributeSet *in_pAttributeSet)								\
	{																				\
		return YOUR_ALG_CLASS::ValidateAttributeSet(in_pContext, in_pAttributeSet);	\
	}																				\
    